<?php


namespace RedMVC\Form\Validator;

/**
 * Url class
 *  
 * @category    RedMVC
 * @package     Form
 * @subpackage  Validator 
 * @author      Jan Fischer, bitWorking <info@bitworking.de>
 */
class Url extends AValidator{
    public function isValid($value, $formValues = null){        
        if(filter_var($value, FILTER_VALIDATE_URL, FILTER_FLAG_SCHEME_REQUIRED) === false){
            $this->setError('FORM_VALIDATOR_URL');
            return false;
        }
        return true;
    }
}